package com.ticket.system.domain.vo;

import lombok.Data;

import java.math.BigDecimal;

/**
 * @ClassName : OrderStatisticsVO
 * @Description :
 * @Author : lixiang
 * @Date: 2023/12/19  17:45
 */

@Data
public class OrderStatisticsVO {
    //订单总数(笔)
    private Integer orderSum;
    //售出票数(张)
    private Integer sellSum;
    //原价汇总(元)
    private BigDecimal originSum;
    //减免汇总(元)
    private BigDecimal reduceSum;
    //应付汇总(元)
    private BigDecimal shouldPaySum;
    //实付汇总(元)
    private BigDecimal actualPaySum;
    //合计退票(张)
    private Integer refundTicketSum;
    //退回金额(元)
    private BigDecimal refundPriceSum;
    //应结算(元)
    private BigDecimal shouldSellSum;
    //余额支付(元)
    private BigDecimal balancePaySum;
    //观演卡支付(元)
    private BigDecimal cardPaySum;
    //微信支付
    private BigDecimal wechatPaySum;
    //余额退回
    private BigDecimal balanceRefundSum;
    //观演卡退回
    private BigDecimal cardRefundSum;
    //微信退回
    private BigDecimal wechatRefundSum;
    //实付分项
    private String actualPayMsg;
    //退款分项
    private String refundPriceMsg;
    //应结算分项
    private String shouldSellMsg;

    private String title;

    public String getActualPayMsg() {
        return "观演卡支付￥"+cardPaySum+"元"+"\n"+"余额支付￥"+balancePaySum+"元"+"\n"+"微信支付￥"+wechatPaySum+"元";
    }

    public String getRefundPriceMsg() {
        return  "观演卡退还￥"+cardRefundSum+"元"+"\n"+"余额退还￥"+balanceRefundSum+"元"+"\n"+"微信退还￥"+wechatRefundSum+"元";
    }

    public String getShouldSellMsg() {
        if(null != cardPaySum && null != balancePaySum && null != wechatPaySum){
            return "观演卡金额￥"+cardPaySum.subtract(cardRefundSum)+"元"+"\n"+"余额￥"+balancePaySum.subtract(balanceRefundSum)+"元"+"\n"+"微信支付金额￥"+wechatPaySum.subtract(wechatRefundSum)+"元";
        }
        return "观演卡金额￥0元"+"\n"+"余额￥0元"+"\n"+"微信支付金额￥0元";
    }
}
